<html><head><title>ProgramExitCode</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">ProgramExitCode()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#3A3966"><b>ProgramExitCode</b></font>(Program)</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Returns the exitcode that was returned when the given program ended. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>Program</i></td>
<td width="90%"> 
The program to use. It must have been started before with <a href="runprogram.html">RunProgram()</a>. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

The exitcode that was returned when the specified program ended. 

</blockquote><p><b>Remarks</b></p><blockquote>

This function should only be used after the given program has ended. 
Use <a href="programrunning.html">ProgramRunning()</a> or <a href="waitprogram.html">WaitProgram()</a> to make sure of that. 
<br>
<br>
The exitcode allows for a single value to be returned from the program, back to the program that 
executed it. This is usually used to indicate either the error or the success of the program. 
<br>
<br>
To return an exitcode from a PB program, use the optional value with the <b><font color="#3A3966">End</font></b> statement: 
<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">End</font></b> 1   <font color="#3A3966">; returns the exitcode 1</font>
</font></pre>

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=nextenvironmentvariable.html>NextEnvironmentVariable()</a> - <a href="index.html">Process Index</a> - <a href="programfilename.html">ProgramFilename()</a> -><br><br>

</body></html>